package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface SpecMapper extends Mapper<Spec> {
    @Select("SELECT tb_spec.name,tb_spec.options from tb_spec INNER JOIN tb_category on tb_spec.template_id = tb_category.template_id where tb_category.`name`=#{categoryName}")
    public List<Map> findSpecByCategoryName(@Param("categoryName") String categoryName);
}
